Learning Flex Basics (Part 1): Creating Your First Flex Application
Table of Contents
- Introduction
- A Brief Overview of Macromedia Flex
- Building the Application
- Create the Application Object
- Add a Panel for the Application Layout
- Add a Label for the View Header
- Add an Array of Objects to Define the Coffee Blends
- Add a ComboBox to Display the Coffee Blends
- Add a Text Control to Display the Description
- Add a Button to Add a Coffee Blend to the Shopping Cart
- Add a List Control for the Shopping Cart
- Add a Script to Handle the Button Click Event
- Complete Code Listing for firstapp.mxml
- Where to Go From Here
Add a Panel for the Application Layout
You generally place the visual components of your Flex application inside containers, which provide bounding boxes for text, controls, images, and other media elements. Here, you will use a container called Panel, which will provide the overall visual wrapper for most applications. You will also use the title attribute of Panel, which provides title text that will display in a title bar that is automatically included at the top of the panel.
-
Inside the Application block, add a Panel block with the title attribute equal to "My First Flex App":
<mx:Panel title="My First Flex App"> </mx:Panel>